#!/usr/bin/env python
# coding=utf-8

# 2-4 序列成员资格示例
# 检查用户名和pin码
database = [
    ['albert', '1234'],
    ['dilbert', '4242'],
    ['smith', '7542'],
    ['jones', '9843']
]

username = input('User name: ')
pin = input('Pin Code: ')
if [username, pin] in database:  # 运算符 in 检查是否满足指定条件,返回True/False
    print('Access granted')
else:
    print('No user')

#%%
# 长度,最小值,最大值
numbers = [100, 34, 589]
print(len(numbers))
print(max(numbers))
print(min(numbers))
